package com.letoken.platform.repo.admin.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.letoken.platform.repo.admin.po.AdminRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.letoken.platform.repo.admin.req.config.QueryAdminRoleReq;
import com.letoken.platform.repo.admin.res.user.QueryAdminRoleByIdRes;
import com.letoken.platform.repo.admin.res.user.QueryAdminRoleRes;
import com.letoken.platform.repo.admin.res.user.QueryRoleTypeRes;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 后台用户角色表 Mapper 接口
 * </p>
 *
 * @author 作者
 * @since 2022-11-23
 */
public interface AdminRoleMapper extends BaseMapper<AdminRole> {

    List<QueryRoleTypeRes> selectRoleTypeRes();

    Page<QueryAdminRoleRes> queryAdminRole(@Param("page") Page<QueryAdminRoleRes> page, @Param("req") QueryAdminRoleReq req);

    QueryAdminRoleByIdRes queryAdminRoleById(@Param("adminRoleId") Integer adminRoleId);

    Integer getRoleId(Integer adminUserId);
}
